package com.tedu.openmedical.staff.controller;

import com.tedu.openmedical.base.response.JsonResult;
import com.tedu.openmedical.staff.pojo.po.StaffPO;
import com.tedu.openmedical.staff.service.StaffService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/v1/staff/")
@Slf4j
public class StaffController {
    @Autowired
    private StaffService staffService;
    @GetMapping("select")
    public JsonResult select() {
        List<StaffPO> list=staffService.select();
        log.debug("职工查询：select={}",list);
        return JsonResult.ok(list);
    }
}
